package cn.silver.module.system.domain;

import cn.silver.framework.mybatis.annotation.Table;
import cn.silver.framework.mybatis.annotation.TableField;
import cn.silver.framework.mybatis.domain.TreeEntity;
import cn.silver.framework.mybatis.enums.SearchTypeEnums;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * 菜单权限表 sys_menu
 *
 * @author Silver Zhou
 */
@Data
@NoArgsConstructor
@Table(name = "sys_menu")
@EqualsAndHashCode(callSuper = true)
@Schema(name = "SysMenu", title = "菜单信息对象")
public class SysMenu extends TreeEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 菜单类型
     */
    @Schema(title = "菜单类型")
    @TableField(name = "type", searchType = SearchTypeEnums.EQ)
    private String type;

    /**
     * 菜单图标
     */
    @Schema(title = "菜单图标")
    private String icon;

    /**
     * 路由地址
     */
    @Schema(title = "路由地址")
    private String url;
    /**
     * 路由参数
     */
    @Schema(title = "路由参数")
    private String param;

    /**
     * 组件路径
     */
    @Schema(title = "组件名称")
    private String component;

    /**
     * 组件路径
     */
    @Schema(title = "组件路径")
    private String path;

    /**
     * 显示状态（0显示 1隐藏）
     */
    @Schema(title = "显示状态")
    private Boolean visible;
    /**
     * 是否为外链（0是 1否）
     */
    @Schema(title = "是否为外链")
    private Boolean frame;
    /**
     * 是否缓存（0缓存 1不缓存）
     */
    @Schema(title = "是否缓存")
    private Boolean cache;

}
